import pygame
pygame.init()
screen=pygame.display.set_mode([200,200])
screen.fill([255,255,255])
a=0
x=1
y=1
while True:
    while a<=255:
        pygame.draw.rect(screen,[a,0,0],[x,y,5,5],0)
        a+=1
        x+=10
        if x==190:
            x=0
            y+=10
    b=int(input())
    if b==10:
        break
pygame.quit()








































































































































































































































































































"""a=1
while a<=100:
    b=a*a
    a+=1
    print(b)

a=int(input())
def gen(a):
    b=1
    T=True
    while T:
        b_1=b*b
        if b_1<a:
            b+=1
        if b_1==a:
            print(f"{b}*{b}={a}")
            T=False
d=gen(a)"""